#include "MachineBase.h"
#include <glfw3.h>

RaceMachine::RaceMachine()
{
	// Initialize class member
	m_MachineState = MACHINESTATE_NONE;
	m_SceneRender = NULL;
}

RaceMachine::~RaceMachine()
{

}

void RaceMachine::Init()
{
	m_MachineState = RACEMACHINESTATE_WAITINGSTART;
}

void RaceMachine::Run()
{
	switch(m_MachineState)
	{
	case RACEMACHINESTATE_WAITINGSTART:
		{
			RenderStartLine();
			break;
		}
	default:
		break;
	}

}

void RaceMachine::InputKeyHandler(int key)
{

}

void RaceMachine::Exit()
{
	printf("Quit the Race Machine ! \n");
	printf("Good bye ! \n");

	// Clear state
	m_MachineState = MACHINESTATE_END;
}

void RaceMachine::SetRender(SceneRender* sceneRender)
{
	m_SceneRender = sceneRender;
}

void RaceMachine::RenderStartLine()
{
	//m_SceneRender->RenderBackground();

}